Optimal. Leaf size=66 \[ -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-d} (b+2 c x)}{\sqrt {b^2-4 c d} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a-d} \sqrt {b^2-4 c d}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 66, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {996, 214}
\begin {gather*} -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-d} (b+2 c x)}{\sqrt {b^2-4 c d} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a-d} \sqrt {b^2-4 c d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 996
Rubi steps
\begin {align*} \int \frac {1}{\sqrt {a+b x+c x^2} \left (d+b x+c x^2\right )} \, dx &=-\left ((2 b) \text {Subst}\left (\int \frac {1}{b \left (b^2-4 c d\right )-(a b-b d) x^2} \, dx,x,\frac {b+2 c x}{\sqrt {a+b x+c x^2}}\right )\right )\\ &=-\frac {2 \tanh ^{-1}\left (\frac {\sqrt {a-d} (b+2 c x)}{\sqrt {b^2-4 c d} \sqrt {a+b x+c x^2}}\right )}{\sqrt {a-d} \sqrt {b^2-4 c d}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 0.39, size = 146, normalized size = 2.21 \begin {gather*} \text {RootSum}\left [-a b^2+a^2 c+b^2 d+2 a b \sqrt {c} \text {$\#$1}-4 b \sqrt {c} d \text {$\#$1}+b^2 \text {$\#$1}^2-2 a c \text {$\#$1}^2+4 c d \text {$\#$1}^2-2 b \sqrt {c} \text {$\#$1}^3+c \text {$\#$1}^4\&,\frac {\log \left (-\sqrt {c} x+\sqrt {a+b x+c x^2}-\text {$\#$1}\right )}{a \sqrt {c}-2 \sqrt {c} d+b \text {$\#$1}-\sqrt {c} \text {$\#$1}^2}\&\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(306\) vs.
\(2(56)=112\).
time = 0.21, size = 307, normalized size = 4.65
method | result | size |
default | \(\frac {\ln \left (\frac {2 a -2 d -\sqrt {b^{2}-4 c d}\, \left (x +\frac {b +\sqrt {b^{2}-4 c d}}{2 c}\right )+2 \sqrt {a -d}\, \sqrt {\left (x +\frac {b +\sqrt {b^{2}-4 c d}}{2 c}\right )^{2} c -\sqrt {b^{2}-4 c d}\, \left (x +\frac {b +\sqrt {b^{2}-4 c d}}{2 c}\right )+a -d}}{x +\frac {b +\sqrt {b^{2}-4 c d}}{2 c}}\right )}{\sqrt {b^{2}-4 c d}\, \sqrt {a -d}}-\frac {\ln \left (\frac {2 a -2 d +\sqrt {b^{2}-4 c d}\, \left (x -\frac {-b +\sqrt {b^{2}-4 c d}}{2 c}\right )+2 \sqrt {a -d}\, \sqrt {\left (x -\frac {-b +\sqrt {b^{2}-4 c d}}{2 c}\right )^{2} c +\sqrt {b^{2}-4 c d}\, \left (x -\frac {-b +\sqrt {b^{2}-4 c d}}{2 c}\right )+a -d}}{x -\frac {-b +\sqrt {b^{2}-4 c d}}{2 c}}\right )}{\sqrt {b^{2}-4 c d}\, \sqrt {a -d}}\) | \(307\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 314 vs.
\(2 (56) = 112\).
time = 2.46, size = 813, normalized size = 12.32 \begin {gather*} \left [\frac {\log \left (\frac {8 \, a^{2} b^{4} + {\left (b^{4} c^{2} + 24 \, a b^{2} c^{3} + 16 \, a^{2} c^{4} + 128 \, c^{4} d^{2} - 32 \, {\left (b^{2} c^{3} + 4 \, a c^{4}\right )} d\right )} x^{4} + 2 \, {\left (b^{5} c + 24 \, a b^{3} c^{2} + 16 \, a^{2} b c^{3} + 128 \, b c^{3} d^{2} - 32 \, {\left (b^{3} c^{2} + 4 \, a b c^{3}\right )} d\right )} x^{3} + {\left (b^{4} + 24 \, a b^{2} c + 16 \, a^{2} c^{2}\right )} d^{2} + {\left (b^{6} + 32 \, a b^{4} c + 48 \, a^{2} b^{2} c^{2} + 32 \, {\left (5 \, b^{2} c^{2} + 4 \, a c^{3}\right )} d^{2} - 2 \, {\left (19 \, b^{4} c + 104 \, a b^{2} c^{2} + 48 \, a^{2} c^{3}\right )} d\right )} x^{2} - 4 \, {\left (2 \, a b^{3} + 2 \, {\left (b^{2} c^{2} + 4 \, a c^{3} - 8 \, c^{3} d\right )} x^{3} + 3 \, {\left (b^{3} c + 4 \, a b c^{2} - 8 \, b c^{2} d\right )} x^{2} - {\left (b^{3} + 4 \, a b c\right )} d + {\left (b^{4} + 8 \, a b^{2} c - 2 \, {\left (5 \, b^{2} c + 4 \, a c^{2}\right )} d\right )} x\right )} \sqrt {a b^{2} + 4 \, c d^{2} - {\left (b^{2} + 4 \, a c\right )} d} \sqrt {c x^{2} + b x + a} - 8 \, {\left (a b^{4} + 4 \, a^{2} b^{2} c\right )} d + 2 \, {\left (4 \, a b^{5} + 16 \, a^{2} b^{3} c + 16 \, {\left (b^{3} c + 4 \, a b c^{2}\right )} d^{2} - {\left (3 \, b^{5} + 40 \, a b^{3} c + 48 \, a^{2} b c^{2}\right )} d\right )} x}{c^{2} x^{4} + 2 \, b c x^{3} + 2 \, b d x + {\left (b^{2} + 2 \, c d\right )} x^{2} + d^{2}}\right )}{2 \, \sqrt {a b^{2} + 4 \, c d^{2} - {\left (b^{2} + 4 \, a c\right )} d}}, -\frac {\sqrt {-a b^{2} - 4 \, c d^{2} + {\left (b^{2} + 4 \, a c\right )} d} \arctan \left (-\frac {{\left (2 \, a b^{2} + {\left (b^{2} c + 4 \, a c^{2} - 8 \, c^{2} d\right )} x^{2} - {\left (b^{2} + 4 \, a c\right )} d + {\left (b^{3} + 4 \, a b c - 8 \, b c d\right )} x\right )} \sqrt {-a b^{2} - 4 \, c d^{2} + {\left (b^{2} + 4 \, a c\right )} d} \sqrt {c x^{2} + b x + a}}{2 \, {\left (a^{2} b^{3} + 4 \, a b c d^{2} + 2 \, {\left (a b^{2} c^{2} + 4 \, c^{3} d^{2} - {\left (b^{2} c^{2} + 4 \, a c^{3}\right )} d\right )} x^{3} + 3 \, {\left (a b^{3} c + 4 \, b c^{2} d^{2} - {\left (b^{3} c + 4 \, a b c^{2}\right )} d\right )} x^{2} - {\left (a b^{3} + 4 \, a^{2} b c\right )} d + {\left (a b^{4} + 2 \, a^{2} b^{2} c + 4 \, {\left (b^{2} c + 2 \, a c^{2}\right )} d^{2} - {\left (b^{4} + 6 \, a b^{2} c + 8 \, a^{2} c^{2}\right )} d\right )} x\right )}}\right )}{a b^{2} + 4 \, c d^{2} - {\left (b^{2} + 4 \, a c\right )} d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\sqrt {a + b x + c x^{2}} \left (b x + c x^{2} + d\right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 703 vs.
\(2 (56) = 112\).
time = 3.45, size = 703, normalized size = 10.65 \begin {gather*} -\frac {\log \left ({\left | -{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} b^{2} c - 4 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} a c^{2} + 8 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} c^{2} d - {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b^{3} \sqrt {c} - 4 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} a b c^{\frac {3}{2}} + 8 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b c^{\frac {3}{2}} d - 3 \, a b^{2} c + 4 \, \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} c^{\frac {3}{2}} + 4 \, a^{2} c^{2} + 2 \, b^{2} c d + 4 \, \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b c + \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} b^{2} \sqrt {c} \right |}\right )}{\sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}}} + \frac {\log \left ({\left | -{\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} b^{2} c - 4 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} a c^{2} + 8 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} c^{2} d - {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b^{3} \sqrt {c} - 4 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} a b c^{\frac {3}{2}} + 8 \, {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b c^{\frac {3}{2}} d - 3 \, a b^{2} c - 4 \, \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )}^{2} c^{\frac {3}{2}} + 4 \, a^{2} c^{2} + 2 \, b^{2} c d - 4 \, \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} {\left (\sqrt {c} x - \sqrt {c x^{2} + b x + a}\right )} b c - \sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}} b^{2} \sqrt {c} \right |}\right )}{\sqrt {a b^{2} - b^{2} d - 4 \, a c d + 4 \, c d^{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{\sqrt {c\,x^2+b\,x+a}\,\left (c\,x^2+b\,x+d\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________